// TOWN DIALOGUE SCRIPT
//    Town 12: Henner's

// This is the dialogue for this town.
// You can use states numbered from 1 to 99.

// Henner may not talk to you...

begintalkscript;

variables;

short choice;

// *** Henner (won't talk) ***
begintalknode 1;
	state = -1;
	personality = 1206;
	nextstate = -1;
	condition = 1;
	question = "Henner";
	text1 = "A tall man is walking around inside the house.";
	text2 = "When you walk in, he turns and looks at you.";
	text3 = "_What are you doing in my house._ he says, then _Get out, I don't want to talk to anybody._";
	text4 = "For some reason, he looks familar...";
	action = END_TALK;
	code =
		if (get_flag(12, 5) == 0) {
			remove_string(4);
		}
	break;

// *** Henner (will talk) ***
begintalknode 5;
	state = -1;
	personality = 1206;
	nextstate = 6;
	condition = 1;
	question = "Henner";
	text1 = "A tall man is walking around inside the house.";
	text2 = "When you walk in, he turns and looks at you.";
	text3 = "_Hello, I am Henner and this is my house._ he says.";
	text4 = "_What do you want of me?_";
	text5 = "Henner looks at you _Can I help you with something?_";
	action = INTRO;

begintalknode 6;
	state = 6;
	personality = 1206;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Henner replies _I tend to my farm here in the wilds of Cresent Valley._";
	text2 = "_I don't really welcome visitors._ he adds.";
	text3 = "_But since Clune sent a letter stating you'd be around, I will talk with you._";
	text4 = "_But since you seemed kind and gave a chance to a broken down soul, I will talk with you._";
	text5 = "It hits you that he was the begger in Cresent Harbor.  Good thing you gave him some coins...";
	code =
		if (get_flag(2, 19) > 0) {
			remove_string(4);
			if (get_flag(2, 15) == 0)
				remove_string(5);
		}
		else {
			remove_string(3);
		}
	break;

begintalknode 7;
	state = 6;
	personality = 1206;
	nextstate = 9;
	condition = 1;
	question = "Why do you live way out here?";
	text1 = "Henner replies _I wish to be left alone.  Society really sucks, especially within the empire._";
	text2 = "Boy, does Henner seem bitter or what!";

begintalknode 8;
	state = 6;
	personality = 1206;
	nextstate = 10;
	condition = get_flag(50, 1) == 0;
	question = "What do know of the she-devil.";
	text1 = "Henner answers _Why would you believe I know anything of the creature in question?_";
	text2 = "He seems to be waiting for an answer.";

begintalknode 9;
	state = 6;
	personality = 1206;
	nextstate = -1;
	condition = get_flag(50, 1) > 0;
	question = "What do know of the she-devil.";
	text1 = "Henner answers _You've already solved that problem, have you not?_";
	text2 = "He seems a little miffed _You didn't have to kill her either._";
	code =
		if (get_flag(50, 9) == 0)
			remove_string(2);
	break;

begintalknode 10;
	state = 9;
	personality = 1206;
	nextstate = -1;
	condition = 1;
	question = "Why does society suck?";
	text1 = "Henner gives a wry smile _Because most of the inhabitants are selfish and self-centered._";
	text2 = "_By removing myself from that rat race, I am better able to get in tune with myself and nature._";
	text3 = "_Besides_ he adds _I live in the empire.  What doesn't suck about that?_";

begintalknode 11;
	state = 10;
	personality = 1206;
	nextstate = -1;
	condition = 1;
	question = "You live out here where it is roaming.";
	text1 = "Henner chuckles _Why so I do, so what?_";

begintalknode 12;
	state = 10;
	personality = 1206;
	nextstate = 12;
	condition = 1;
	question = "You seem to be in tune with nature.";
	text1 = "Henner says _Why yes I am._";
	text2 = "He pauses _OK, I do know something about her.  Sit down and let me tell you about her._";
	text3 = "You settle in for the story.";

begintalknode 13;
	state = 12;
	personality = 1206;
	nextstate = 13;
	condition = 1;
	question = "OK, go on.";
	text1 = "Henner seems thoughtful _She appeared a while back, seemingly out of nowhere._";
	text2 = "_Due to her innate abilities, men-folk here about were drawn to her like flies to a light._";
	text3 = "_When the men got to close, her natural instinct took over and they ended up dead or maimed._";
	text4 = "_I myself ran into her, but managed to control myself.  We talked and I found out what she's doing here._";
	text5 = "Henner takes a drink of water.";

begintalknode 14;
	state = 13;
	personality = 1206;
	nextstate = 14;
	condition = 1;
	question = "Continue, please.";
	text1 = "Henner continues _Some time back, a group of smugglers, who knew of a secret passage from Avernum,_";
	text2 = "_came up from below with a little devil-doll.  Appearantly they had found it someplace._";
	text3 = "_That doll belongs to the she-devil and she wants it back._";
	text4 = "_She followed the path of the smugglers to Cresent Valley before losing them._";
	text5 = "_In order to alleviate the killings in the region, I have helped her with a place to stay until the doll is found._";
	text6 = "_Unfortunately, she still occasionally roams looking for her doll._";
	text7 = "_Have you been to talk to her yet?_ Henner asks.";
	code =
		if (get_flag(12, 4) == 0)
			remove_string(7);
	break;

begintalknode 15;
	state = 14;
	personality = 1206;
	nextstate = 17;
	condition = get_flag(12, 4) == 0;
	question = "Could I get in to see her?";
	text1 = "Henner looks at you _Do you think you can control yourselfs?_ he asks.";
	text2 = "_If so, I can activate the portal to her location._";
	text3 = "Henner awaits your response.";

begintalknode 16;
	state = 14;
	personality = 1206;
	nextstate = -1;
	condition = get_flag(12, 4) > 0;
	question = "No, not yet.";
	text1 = "Henner looks sad _Oh well, I was hoping you could do something to help this region._";

begintalknode 17;
	state = 17;
	personality = 1206;
	nextstate = -1;
	condition = 1;
	question = "Yes I can.";
	text1 = "Henner says _OK, please be careful and try not to hurt her._";
	text2 = "With that, he goes into his bedroom and pulls a lever activating the portal outside.";
	text3 = "He turns to you _She is staying in a cave on the other side of the portal._";
	text4 = "_Good luck._ he adds.";
	action = END_TALK;
	code =
		set_flag(12, 4, 1);
	break;

begintalknode 18;
	state = 17;
	personality = 1206;
	nextstate = -1;
	condition = 1;
	question = "No I can't.";
	text1 = "Henner says _At least you are truthful._";
	text2 = "_Come back when you are more ready to meet her._";
	action = END_TALK;
